package org.framework.define.bean.entity;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the tbl_task_type_limit database table.
 * 
 */
@Embeddable
public class TblTaskTypeLimitPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="buyer_biz_account", unique=true, nullable=false, length=25)
	private String buyerBizAccount;

	@Column(name="seller_biz_account", unique=true, nullable=false, length=25)
	private String sellerBizAccount;

	@Column(name="task_type", unique=true, nullable=false)
	private int taskType;

	public TblTaskTypeLimitPK() {
	}
	public String getBuyerBizAccount() {
		return this.buyerBizAccount;
	}
	public void setBuyerBizAccount(String buyerBizAccount) {
		this.buyerBizAccount = buyerBizAccount;
	}
	public String getSellerBizAccount() {
		return this.sellerBizAccount;
	}
	public void setSellerBizAccount(String sellerBizAccount) {
		this.sellerBizAccount = sellerBizAccount;
	}
	public int getTaskType() {
		return this.taskType;
	}
	public void setTaskType(int taskType) {
		this.taskType = taskType;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof TblTaskTypeLimitPK)) {
			return false;
		}
		TblTaskTypeLimitPK castOther = (TblTaskTypeLimitPK)other;
		return 
			this.buyerBizAccount.equals(castOther.buyerBizAccount)
			&& this.sellerBizAccount.equals(castOther.sellerBizAccount)
			&& (this.taskType == castOther.taskType);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.buyerBizAccount.hashCode();
		hash = hash * prime + this.sellerBizAccount.hashCode();
		hash = hash * prime + ((int) this.taskType);
		
		return hash;
	}
}